package com.acegear.horizon.domain.repository.jpa;

import com.acegear.horizon.domain.models.jpa.ClubEventQA;

import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.CrudRepository;

import java.util.List;
import java.util.Optional;

/**
 * Created by wangsike on 2017/1/14.
 */
public interface ClubEventQARepository extends CrudRepository<ClubEventQA, Long> {
    List<ClubEventQA> findByEventIdAndAnswered(Long eventId, Boolean answered, Pageable pageable);

    Optional<ClubEventQA> findTopByEventQAId(Long eventQAId);
    
    List<ClubEventQA> findByEventIdAndAnswered(Long eventId, Boolean answered); // TreeJohn

}
